<?php 

include("lib/facebook.php");

$appapikey = '3e99105ed5c922110fb95eeb507e1599';
$appsecret = 'fa104a2e1f7d83328599406adbe7cbf1';
$facebook = new Facebook($appapikey, $appsecret);


 $session_key = $_REQUEST['session_key'];
 $facebook->api_client->session_key = $session_key ;
 $user =$facebook->api_client->users_getLoggedInUser();

 $result = $facebook->api_client->fql_query("SELECT name, pic FROM user WHERE uid=211031 OR uid in (SELECT uid2 FROM friend WHERE uid1 =$user)");
print_r($result); 


